package com.netty.test.bean;

import io.netty.handler.codec.http.HttpResponseStatus;

import java.util.HashMap;
import java.util.Map;

/**
 * @author hxm
 */
public class HttpResult {

    private RespType respType;

    private byte[] content;

    private Map<String,String> headers=new HashMap<>();

    private HttpResponseStatus httpStatus;

    /**
     * 重定向使用
     */
    private String location;

    public enum RespType{
        文本类型,HTML类型,JSON类型,重定向类型,未知类型
    }

    public RespType getRespType() {
        return respType;
    }

    public void setRespType(RespType respType) {
        this.respType = respType;
    }

    public byte[] getContent() {
        return content;
    }

    public void setContent(byte[] content) {
        this.content = content;
    }

    public Map<String, String> getHeaders() {
        return headers;
    }

    public void setHeaders(Map<String, String> headers) {
        this.headers = headers;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public HttpResponseStatus getHttpStatus() {
        return httpStatus;
    }

    public void setHttpStatus(HttpResponseStatus httpStatus) {
        this.httpStatus = httpStatus;
    }
}
